/**
 * Copyright 2011 Poltman.Ltd; www.poltman.com. All rights reserved.		
 *
 * This file is part of the dspace-poltman project http://www.poltman.com.
 *
 * This is free software; you can redistribute it and/or modify it under
 * the terms of DuraSpace DSpace license detailed in the LICENSE and NOTICE 
 * files at the root of the source tree and available online at
 * http://www.dspace.org/license/
 * 
 */

package com.poltman.dscentral.db.service.pm.impl;

import java.util.List;

import org.apache.log4j.Logger;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.poltman.dscentral.db.entity.pm.LanguagesEntity;
import com.poltman.dscentral.db.exceptions.RepositoryAccessException;
import com.poltman.dscentral.db.exceptions.RepositoryException;
import com.poltman.dscentral.db.repository.pm.LanguagesRepository;
import com.poltman.dscentral.db.service.pm.LanguagesService;

/**
 * 
 * @author Zbigniew Ciok; z.ciok@poltman.com
 *
 */
@Service("languagesService")
public class LanguagesServiceImpl implements LanguagesService {
	
	private static Logger log = Logger.getLogger(LanguagesServiceImpl.class);

	@Autowired
	private LanguagesRepository repository;
	
	@Override
	public List<LanguagesEntity> findAll()  throws RepositoryAccessException, RepositoryException {
		return repository.findAll();
	}
	
	@Override
	public List<LanguagesEntity> findByImplemented(Boolean implemented) throws RepositoryAccessException, RepositoryException {
		return repository.findByImplemented(implemented);
	}

	@Override
	public LanguagesEntity findByName(String name) throws RepositoryAccessException, RepositoryException {
		return repository.findByName(name);
	}
	
}
